package com.zhou.common.operator.log.storage.api.feign;

import com.zhou.common.operator.log.core.ao.OperateLogInfoGetPageListAO;
import com.zhou.common.operator.log.storage.api.OperateLogRecord;
import com.zhou.common.operator.log.storage.api.config.OperateLogConfiguration;
import com.zhou.common.pub.model.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(
        name = "${szzz.operate.log.server.name:operatelog-service}",
        url = "${szzz.operate.log.server.url:}",
        configuration = {OperateLogConfiguration.class}
)
public interface OperateLogFeignClient {
    @GetMapping({"/operateLog/list"})
    Response list(OperateLogInfoGetPageListAO ao);

    @PostMapping({"/operateLog/batch/append"})
    Response append(@RequestBody List<OperateLogRecord> newItems);
}
